<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>按钮与 GIF 示例</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            flex-direction: column;
        }
        #actionButton {
            width: 150px; /* 设置按钮宽度 */
            height: 50px; /* 设置按钮高度 */
            font-size: 18px; /* 设置按钮文字大小 */
            padding: 10px 20px; /* 设置按钮内边距 */
        }
    </style>
</head>
<body>
<img id="gifImage" src="loading.gif" width="200" alt="加载中...">
<button id="actionButton">点击我</button>

<script>
    document.getElementById('actionButton').addEventListener('click', async function() {
        // 模拟耗时操作
        await new Promise(resolve => setTimeout(resolve, 3000));
        alert('操作完成');
    });
</script>
</body>
</html>
